<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>志愿者预约后台管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <link rel="stylesheet" href="/css/modules/code.css">
    <link rel="stylesheet" href="/css/modules/laydate/default/laydate.css">
    <link rel="stylesheet" href="/css/modules/layer/default/layer.css">
    <link rel="stylesheet" href="/css/layui.css">
    <#include "common/common-head.html"/>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">居家养老系统后台管理</div>
    </div>

    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item layui-nav-itemed">
                    <a href="/index">老人信息</a>
                </li>
                <li class="layui-nav-item">
                    <a href="/order/docList">医生预约情况</a>
                </li>
                <li class="layui-nav-item">
                    <a href="/order/volList">志愿者预约情况</a>
                </li>

            </ul>
        </div>
    </div>

    <div class="layui-body">
        <!-- 内容主体区域 -->

        <table class="layui-hide" id="demo" lay-filter="demo"></table>

    </div>

    <div class="layui-footer">

        © 居家养老系统 Copyright 钱坤
    </div>
</div>

<script src="js/layui.all.js"></script>
<script src="js/jquery-3.3.1.js"></script>
<script>

    //JavaScript代码区域
    layui.use('element', function () {
        var element = layui.element;

    });

    layui.use('table', function () {
        var table = layui.table;

        //展示已知数据
        table.render({
            elem: '#demo'
            , cols: [[ //标题栏
                {field: 'id', title: '编号', width: 80}
                , {field: 'username', title: '姓名', width: 100}
                , {field: 'servicetype', title: '服务类型', width: 100}
                , {field: 'date', title: '预约日期', width: 150}
                , {field: 'remark', title: '备注', minWidth: 160}
            ]]
            , url: "/order/volListData"
            //,skin: 'line' //表格风格
            , even: true
            //,page: true //是否显示分页
            //,limits: [5, 7, 10]
            //,limit: 5 //每页默认显示的数量
        });
    });

    $(".laytable-cell-1-experience").click(function (e) {
        console.log(database);
        let b = $('.laytable-cell-1-experience').index($(this));
        console.log(b);
        layer.open({
            title: '在线调试'
            , content: database[b - 1].username
            , offset: 'auto'
        });

    });

</script>
</body>
</html>
